// 字符串A:ababaaababb，字符串B:ab，给出C语言代码求出字符串A中有多少个字符串B
#include "stdio.h"
int get_num(char *str1, char *str2){
    char *p = str1;
    int count = 0;
    for (char *p = str1; *p != '\0'; p++) {
        if (p[1] != '\0' && p[0] == str2[0] && p[1] == str1[1] ) {
            count++;
        }
    }
    return count;
}


int main(){
    char str1[] = "ababaaababb";
    char str2[] = "ab";
    printf("%d\n",get_num(str1, str2));
    return 0;
}